Linux系统之lspci命令介绍
lspci,顾名思义,就是显示所有的pci设备信息。pci是一种总线,而通过pci总线连接的设备就是pci设备了。如今,我们常用的设备很多都是采用pci总线了,如:网卡、存储等。下面就简单介绍下该命令。
lspci:显示所有的pci设备信息。包括设备的BDF,设备类型,厂商信息等。
lspci -t [BDF]:显示指定BDF号的设备信息。
lspci -m/-mm:以一种机器可读的格式来显示pci设备信息。下面的实例可以看出其具体的区别。
# lspci -s ff:13.1
ff:13.1 System peripheral: Intel Corporation Broadwell Memory Controller 0 - Target Address/Thermal/RAS (rev 03)
# lspci -mm -s ff:13.1
ff:13.1 "System peripheral" "Intel Corporation" "Broadwell Memory Controller 0 - Target Address/Thermal/RAS" -r03 "Intel Corporation" "Broadwell Memory Controller 0 - Target Address/Thermal/RAS"
lspci -t:以树的形式显示pci设备信息。
lspci -v/-vv/-vvv:显示详细的pci设备信息,v越多,越详细,当然,上限3个。
# lspci -s ff:1f.2
ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)
# lspci -v -s ff:1f.2
ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)
Flags: fast devsel
# lspci -vv -s ff:1f.2
ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
# lspci -vvv -s ff:1f.2
ff:1f.2 System peripheral: Intel Corporation Broadwell Power Control Unit (rev 03)
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
lspci -x/-xxx/-xxxx:-x以16进制信息显示pci配置空间;-xxx显示部分读配置空间会crash的设备;-xxxx显示PCI-x2.0或者PCI-e总线扩展的配置空间。
lspci -b:以总线的角度来显示所有的IRQ和地址。根据我的观察,大部分信息和不带参数时显示一致,除了SR-IOV设备分配出的Virtual Function设备。如下示例:物理网卡PF(physical function )显示一直 ,但VF(virtual function )显示却不同。
# lspci -b -s 0a:00.1; lspci -b -s 0a:10.0
0a:00.1 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
0a:10.0 Ethernet controller: Illegal Vendor ID Device ffff (rev 01)
# lspci -s 0a:00.1; lspci -s 0a:10.0
0a:00.1 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
0a:10.0 Ethernet controller: Intel Corporation X540 Ethernet Controller Virtual Function (rev 01)
lspci -D:显示PCI domain号,默认的不加参数命令并不显示该值。如下示例:
# lspci -s 0a:00.0
0a:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
# lspci -D -s 0a:00.0
0000:0a:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
lspci -n/-nn:显示设备的vendor厂商号和device设备号;显示厂商等信息和名称。
# lspci -nn | grep ff:1f.2
ff:1f.2 System peripheral [0880]: Intel Corporation Broadwell Power Control Unit [8086:6f8a] (rev 03)
# lspci -n | grep ff:1f.2
ff:1f.2 0880: 8086:6f8a (rev 03)
lspci -D:显示设备的厂商号、设备号、Class号。
# lspci -Q -s 0c:00.1
0c:00.1 Class 0200: Device 8086:1528 (rev 01)
相关热词:
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/server/ml/10194.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
这是另一个例子
时间:2021-01-15
-
请检查 official 这一列上是
时间:2021-01-14
-
方法是使用 ip route 命令:
时间:2021-01-14
-
%W 一年中的第几个星期
时间:2021-01-14
-
6.查看 USB 信息 $ lsusb 要查
时间:2021-01-14
-
ubuntu移植Tcpdump到Android平
时间:2021-01-14
-
可能现在听起来 /dev/zer
时间:2021-01-14
-
history命令使用方法详解
时间:2021-01-05
热门文章
-
绝不要用的Linux命令
时间:2020-12-22
-
如何使用date命令
时间:2020-12-22
-
检查系统和硬件信息的命令
时间:2020-12-22
-
Linux命令输出头(标题)、输出结果排序
时间:2020-12-24
-
Linux命令行工具使用小贴士及技巧(一)
时间:2020-12-24
-
容器监控的命令行工具cTop
时间:2020-12-22
-
Linux命令行文本加密的小技巧
时间:2021-01-05
-
解读ip命令展示的网络连接信息
时间:2020-12-22
-
不常见但是很有用的GCC命令行选项(二)
时间:2020-12-28
-
通过实例学习tcpdump命令
时间:2020-12-22
